package com.feifan.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author Donald
 * @create 2019-04-22 12:43
 * 过滤器拦截器的配置类 //WebMvcConfigurer
 */
@Configuration
public class WebContiner extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        MyInterceptorRequest myInterceptorRequest =  new MyInterceptorRequest();
        registry.addInterceptor(myInterceptorRequest).addPathPatterns("/**");
        super.addInterceptors(registry);
    }


}
